package org.mikeliu.zzjexp1;

import java.util.Scanner;

public class Exp3 {
	public static void main(String[] args) {
		int n;
		Scanner scanner=new Scanner(System.in);
		n=scanner.nextInt();
		if(n<=0) {
			System.out.println(0);
		}
		if(n>=120) {
			System.out.println(120*20+40*(n-120));
		} else {
			System.out.println(n*20);
		}
	}
}
